﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 课程基础输入参数
    /// </summary>
    public class KechengBaseInput
    {
        /// <summary>
        /// 选课任务
        /// </summary>
        public virtual long XuankeTaskId { get; set; }
        
        /// <summary>
        /// 课程名称
        /// </summary>
        public virtual string Name { get; set; }
        
        /// <summary>
        /// 课程介绍
        /// </summary>
        public virtual string? Description { get; set; }
        
        /// <summary>
        /// 上课老师
        /// </summary>
        public virtual long? TeacherId { get; set; }
        
        /// <summary>
        /// 上课地点
        /// </summary>
        public virtual string? Address { get; set; }
        
        /// <summary>
        /// 招生人数
        /// </summary>
        public virtual int? ZhaoshengRenshu { get; set; }
        
        /// <summary>
        /// 录取人数
        /// </summary>
        public virtual int? LvquRenshu { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public virtual string? Remark { get; set; }

    /// <summary>
    /// 每班人数
    /// </summary>
    public int? BanjiLimit { get; set; }

    /// <summary>
    /// 创建者姓名
    /// </summary>
    public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
    }

    /// <summary>
    /// 课程分页查询输入参数
    /// </summary>
    public class KechengInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 选课任务
        /// </summary>
        public long? XuankeTaskId { get; set; }
        
        /// <summary>
        /// 课程名称
        /// </summary>
        public string? Name { get; set; }
        
        /// <summary>
        /// 课程介绍
        /// </summary>
        public string? Description { get; set; }
        
        /// <summary>
        /// 上课老师
        /// </summary>
        public long? TeacherId { get; set; }
        
    }

    /// <summary>
    /// 课程增加输入参数
    /// </summary>
    public class AddKechengInput : KechengBaseInput
    {
        /// <summary>
        /// 选课任务
        /// </summary>
        [Required(ErrorMessage = "选课任务不能为空")]
        public override long XuankeTaskId { get; set; }
        
        /// <summary>
        /// 课程名称
        /// </summary>
        [Required(ErrorMessage = "课程名称不能为空")]
        public override string Name { get; set; }
        
    }

    /// <summary>
    /// 课程删除输入参数
    /// </summary>
    public class DeleteKechengInput : BaseIdInput
    {
    }

    /// <summary>
    /// 课程更新输入参数
    /// </summary>
    public class UpdateKechengInput : KechengBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 课程主键查询输入参数
    /// </summary>
    public class QueryByIdKechengInput : DeleteKechengInput
    {

    }

    /// <summary>
    /// 课程导入DTO
    /// </summary>
    public class ImportKechengInput
    {
        /// <summary>
        /// 选课任务Id
        /// </summary>
        [Required(ErrorMessage = "选课任务Id不能为空")]
        public long XuankeTaskId { get; set; }
        /// <summary>
        /// 文件Id不能为空
        /// </summary>
        [Required(ErrorMessage = "文件Id不能为空")]
        public long FileId { get; set; }
    }
